package com.hxs.hxsserver.service;

import com.hxs.hxsserver.domain.dto.device.DeviceSSEDto;
import com.hxs.hxsserver.domain.entity.device.Device;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author liuchuan
 * @create 2024/9/25
 */
public interface SSEService {
    void streamSSE(HttpServletResponse response, String deviceAddr)  throws IOException;

    void sendMessage(String messageHex,String inetAddress);

    Boolean command(DeviceSSEDto deviceSSEDto);

    void updateStatusDevice(String deviceAddr,int status);

    Boolean saveOrUpdate(Device device,String messageHex);
}
